Page({
    data: {
        selected: null,
        list: [{
                "pagePath": "/pages/index/index",
                "text": "首页",
                "iconPath": "/icon/home.png",
                "selectedIconPath": "/icon/home.png"
            },
            {
                "pagePath": "/pages/mine/mine",
                "text": "我的",
                "iconPath": "/icon/user.png",
                "selectedIconPath": "/icon/user.png"
            }
        ]
    },


    switchTab(e) {
        const {
            index,
            url
        } = e.currentTarget.dataset;
        if (this.data.selected == index || index == undefined) return;
        wx.switchTab({
            url,
        })
    },


})